package ch07_GUI编程;

import javax.swing.*;
import java.awt.*;

public class JFrameDemo extends JFrame {
	public static void main(String[] args) {
		JFrameDemo win = new JFrameDemo();
		JButton b = new JButton("我是一个按钮");
		win.setLayout(new FlowLayout());
		win.add(b);
		win.setTitle("我的第一个GUI程序");
		win.setSize(400, 100);
		win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		win.setVisible(true);
	}
}
